home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / xgui / sources / ui_mainP.ph < prev    next >
Encoding:
Text File  |  1994-04-25  |  5.4 KB  |  172 lines

  1. /*****************************************************************************
  2.   FILE           : ui_mainP.ph
  3.   SHORTNAME      : mainP.ph
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        : Header file of correspondent '.c' file
  7.   NOTES          :
  8.  
  9.   AUTHOR         : Tilman Sommer
  10.   DATE           : 1.4.1990
  11.  
  12.   CHANGED BY     : Guenter Mamier
  13.   IDENTIFICATION : @(#)ui_mainP.ph    1.10 3/2/94
  14.   SCCS VERSION   : 1.10
  15.   LAST CHANGE    : 3/2/94
  16.  
  17.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  18.              
  19. ******************************************************************************/
  20.  
  21.  
  22. #ifndef _UI_MAINP_DEFINED_
  23. #define _UI_MAINP_DEFINED_
  24.  
  25.  
  26. /* begin global definition section */
  27.  
  28.  
  29. void ui_xCreateGC (Window);
  30. void ui_printMessage (char *);
  31. void ui_displayDone (Widget, struct Ui_DisplayType *, caddr_t);
  32. void ui_popupDone (Widget, int, caddr_t);
  33. void ui_rem_initNet (Widget, int, caddr_t);
  34. void ui_popupWeights (Widget, int, caddr_t);
  35. void ui_editPopup (Widget, struct SimpleListType *, caddr_t);
  36. void ui_editSitePopup (Widget, struct SimpleListType *, caddr_t);
  37. void ui_listPopup (struct SimpleListType *, Position, Position);
  38. void ui_displayFilePanel (Widget, Widget, caddr_t);
  39. void ui_displayLayerPanel (Position, Position);
  40. void ui_displayGraphic (Widget, struct Ui_DisplayType *, caddr_t);
  41. void ui_displayRemote (Widget, caddr_t, caddr_t);
  42. void ui_displayText (Widget, caddr_t, caddr_t);
  43. void ui_displayHelp (char *);
  44. void ui_guiQuit (Widget, XtPointer, XtPointer);
  45. void ui_loadFileFromCommandLine (void);
  46. void ui_parseCmdLine (XtAppContext, int, char *[]);
  47.  
  48.  
  49.     /* Handles of popup shells. Used by ui_popupDone() */
  50. Widget ui_popRemote, ui_popResult;
  51.  
  52.     /* message widget in the remote panel */
  53. Widget ui_remoteMessageWidget;
  54.  
  55.     /* widgets of init net */
  56. Widget  ui_initParameterWidgets[UI_NO_INIT_PARAMS];
  57.  
  58.     /* widgets of jog/random weights panel */
  59. Widget  ui_highLimitWidget, ui_lowLimitWidget;
  60.  
  61.     /* widget of message displayed when the 
  62.     bubble of a slider in the setup panel was moved */
  63. Widget  ui_setupSliderMessage;
  64.  
  65.  
  66.  
  67.  
  68.  
  69. GC             ui_gc;         /* xgui graphic context */
  70. XFontStruct   *ui_fontStruct; 
  71. int            ui_screen;     /* X screen */
  72.  
  73.  
  74.  
  75.  
  76.     /* display for with the setup panel was displayed */
  77. struct Ui_DisplayType  *ui_set_displayPtr; /* for xgui */
  78.  
  79. Display       *ui_display;    /* for X */
  80.  
  81. Widget  ui_toplevel;
  82. Widget  ui_message;  /* message in the manager panel */
  83.  
  84.     /* shell widgets of info, remote, setup and file panel */
  85. Widget  ui_infoPanel, ui_setupPanel;
  86.     /* widgets in the setup panel */
  87. Widget  ui_set_gridWidthWidget, ui_set_originXWidget;
  88. Widget  ui_set_originYWidget;
  89. Widget  ui_set_subnetWidget;
  90. Widget  ui_set_zWidget;
  91.  
  92.     /* panel created yes or no */
  93. Bool    ui_setupIsCreated;
  94.  
  95.     /* data displayed in the file panel */
  96. char    ui_edit_actFuncName[MAX_NAME_LENGTH];
  97. char    ui_edit_outFuncName[MAX_NAME_LENGTH];
  98. char    ui_edit_FTypeName[MAX_NAME_LENGTH];
  99.  
  100. XGCValues      ui_gcValues;   /* initial gc values */
  101.  
  102.  
  103. /* end global definition section */
  104.  
  105. /* begin private definition section */
  106.  
  107.  
  108. static void ui_textLook (Widget, XtPointer, XtPointer);
  109. static void ui_textMore (Widget, XtPointer, XtPointer);
  110. static void ui_textKey (Widget, char *);
  111. static void ui_textTopics (Widget, Widget, caddr_t);
  112. static void ui_showHelpMsg (char *);
  113. static void ui_refresh (Widget, struct Ui_DisplayType *, XEvent *);
  114. static void ui_popupSetup (Widget, struct Ui_DisplayType *, caddr_t);
  115. static void ui_listPopupDone (Widget, struct SimpleListType *, caddr_t);
  116. static void ui_helpDone (Widget, struct HelpType*, caddr_t);
  117. static void ui_editPopupDone (Widget, struct SimpleListType *, caddr_t);
  118. static int ui_chkFileName (char *, char *);
  119.  
  120. #ifdef _UNUSED_FUNCTIONS_
  121.  
  122. static void ui_syntax (XtAppContext, char *);
  123.  
  124. #endif /* _UNUSED_FUNCTIONS */
  125.  
  126.     /* Needed for textlook, textmore and textkey */
  127. static off_t ui_lengthOfHelp;
  128.  
  129. static Bool  ui_filePannelPoppedUp = FALSE;  /* indicates that the file pannel 
  130.                                          is popped up */
  131. static char ui_fontName[255];
  132.     /* names of possible fonts  */
  133. #define noOfFontNames 8
  134. static char *ui_fontNames[noOfFontNames] = {
  135.         "6x12",
  136.        "-*-fixed-medium-r-semicondensed-*-12-*-*-*-*-*-iso8859-*",
  137.        "-*-fixed-medium-r-*-*-12-*-*-*-*-*-iso8859-*",
  138.        "-*-*-medium-r-*-*-12-*-*-*-*-*-iso8859-*",
  139.        "-*-*-*-r-*-*-12-*-*-*-*-*-iso8859-*",
  140.        "-*-*-*-*-*-*-12-*-*-*-*-*-iso8859-*",
  141.        "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-*",
  142.        "*",
  143.     };
  144. static Bool  ui_helpOk = FALSE;   /* indicates that help.hdoc is ok */
  145.     /* list and free list of help windows */
  146. static struct HelpType *ui_help_listPtr     = NULL;
  147. static struct HelpType *ui_help_freeListPtr = NULL;
  148.     /* load from command line */
  149. static Bool ui_loadNetbyInit = FALSE;
  150. static Bool ui_loadPatbyInit = FALSE;
  151. static Bool ui_loadCfgbyInit = FALSE;
  152. static Bool  ui_noOfHelpsUp = 0;   /* number of help windows created */
  153.     /* Handles of popup shells. Used by ui_popupDone() */
  154. static Widget ui_popDummy, ui_popSetup, ui_popFile, ui_popEdit, ui_popWeights,
  155.        ui_popCanvas, ui_popList, ui_popLayer, ui_popInit;
  156. static Bool  ui_pop_exit = FALSE;  /* used, when popup window has its own 
  157.                    event dispatching loop */
  158.     /* frame widgets (form) of setup and file panel */
  159. static Widget ui_setupBox, ui_fileBox;
  160.     /* true if font specified in command line */
  161. static Bool hasCmdlineFont = FALSE;
  162.  
  163.  
  164. /* end private definition section */
  165.  
  166.  
  167. #endif /* _UI_MAINP_DEFINED_ */
  168.  
  169.  
  170. /* end of file */
  171. /* lines: 48 */
  172.